<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use DateTimeInterface;

class BaseModel extends Model
{
    use HasFactory;

    public function serializeDate(DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: "Y-m-d H:i:s");
    }
}
